package com.my.cd.visitor;

/**
 * 具体的访问者：根据年龄的奖金补偿制度的访问者。
 */
public class CompeVisitor implements Visitor {

    @Override
    public void visit(Element element) {
        Employee employee = (Employee) element;
        System.out.println(employee.getName() + "'s Compensation is " + (employee.getAge() * 100));
    }

}
